<template>
    <div>
      <table>
        <tr v-for="i in users">
          <td v-if="i.role_id==='超级管理员'" style="color: red">{{i.name}}</td>
          <td v-if="i.role_id==='普通用户'" style="color: black">{{i.name}}</td>
          <td><img :src="'http://127.0.0.1:8000'+i.img" width="250" height="250" alt=""></td>
          <td>{{i.role_id}}</td>
          <td>{{i.count}}</td>
        </tr>
      </table>
    </div>
</template>

<script>
  import axios from 'axios'
    export default {
        name: "xiang",
      data:function () {
        return{
          users:""
        }
      },
      mounted() {
          axios({
            url:"http://127.0.0.1:8000/xiang/",
            method:"post",
            data:{
              id:this.$route.query.id
            }
          }).then(res=>{
            this.users=res.data.users
          })
      }
    }
</script>

<style scoped>

</style>
